package net.mgsx.product.t2m.modisco.testability;
import org.eclipse.gmt.modisco.java.ClassDeclaration;
import org.eclipse.gmt.modisco.infra.query.core.exception.ModelQueryExecutionException;
import org.eclipse.gmt.modisco.infra.query.core.java.IJavaModelQuery;
import org.eclipse.gmt.modisco.infra.query.core.java.ParameterValueList;

public class IsUnmockable implements IJavaModelQuery<ClassDeclaration, Boolean> {
	public Boolean evaluate(final ClassDeclaration context, final ParameterValueList parameterValues)
			throws ModelQueryExecutionException {
		MockAnalysis analyser = new MockAnalysis();
		analyser.analyse(context);
		return analyser.getUnmockableDependencies().size() > 0;
	}
}
